export interface ResponseData {
	status: number
}

// 创建群聊提交的data数据类型
export interface CreateGroupData {
	userId: string
	groupName: string
	sign: string
	imgUrl: string
}

// 创建群聊接口返回的ts类型
export interface CreateGroupResponseData extends ResponseData {
	msg: string
	groupId?: string
}

export type FriendType = {
	imgUrl: string
	nick: string
	sign: string
	_id: string
}
export type GroupType = {
	groupName: string
	imgUrl: string
	_id: string
}
// 关键字搜索接口返回的ts类型
export interface KeywordResult extends ResponseData {
	data: {
		friendList: FriendType[]
		groupList: GroupType[]
	}
}

export interface IUserInfoType {
	WaiFCode: string
	age: string
	birthday: string
	imgUrl: string
	nick: string
	phone: string
	sex: string
	sign: string
	start: string
	_id: string
}

// 好友申请
export interface IFriendNoagree {
	friendId: {
		_id: string
		nick: string
		imgUrl: string
	}
	state: number
	time: Date
	userId: string
	_id: string
}

export interface IFriendType {
	imgUrl: string
	nick: string
	sign: string
	_id: string
}

export interface IGroupType {
	groupName: string
	imgUrl: string
	_id: string
}

export interface IGroupInfoType {
	group: {
		_id: string
		userId: string
		groupName: string
		groupNumber: string
		sign: string
		imgUrl: string
		creatTime: string
	}
	groupUser: [
		{
			_id: string
			groupId: string
			userId: {
				_id: string
				nick: string
				imgUrl: string
				sex: string
				birthday: string
			}
			state: number
		}
	]
	statis: {
		maleNum: number
		femaleNum: number
		is00sBornNum: number
	}
}

// 群聊申请类型
export interface IGroupNoagree {
	groupId: {
		_id: string
		groupName: string
		imgUrl: string
	}
	time: Date
	userId: {
		nick: string
		_id: string
	}
	_id: string
}
